{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 全部行都能输出\n",
    "from IPython.core.interactiveshell import InteractiveShell\n",
    "InteractiveShell.ast_node_interactivity = \"all\"\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "\n",
    "# 解决坐标轴刻度负号乱码\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "\n",
    "# 解决中文乱码问题\n",
    "plt.rcParams['font.sans-serif'] = ['Heiti TC']\n",
    "\n",
    "plt.style.use('ggplot')\n",
    "# plt.figure(figsize=(2,3),dpi=720)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>颜色深度</th>\n",
       "      <th>酒精浓度</th>\n",
       "      <th>品种</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>140.23</td>\n",
       "      <td>5.64</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>130.20</td>\n",
       "      <td>4.38</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>130.16</td>\n",
       "      <td>5.68</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>140.37</td>\n",
       "      <td>4.80</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>130.24</td>\n",
       "      <td>4.32</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>120.07</td>\n",
       "      <td>2.76</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>120.43</td>\n",
       "      <td>3.94</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>110.79</td>\n",
       "      <td>3.10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>120.37</td>\n",
       "      <td>2.12</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>120.04</td>\n",
       "      <td>2.60</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     颜色深度  酒精浓度  品种\n",
       "0  140.23  5.64   0\n",
       "1  130.20  4.38   0\n",
       "2  130.16  5.68   0\n",
       "3  140.37  4.80   0\n",
       "4  130.24  4.32   0\n",
       "5  120.07  2.76   1\n",
       "6  120.43  3.94   1\n",
       "7  110.79  3.10   1\n",
       "8  120.37  2.12   1\n",
       "9  120.04  2.60   1"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rowdata = {'颜色深度': [140.23,130.2,130.16,140.37,130.24,120.07,120.43,110.79,120.37,120.04],\n",
    "           '酒精浓度': [5.64,4.38,5.68,4.80,4.32,2.76,3.94,3.1,2.12,2.6],\n",
    "           '品种':     [0,0,0,0,0,1,1,1,1,1]}        \n",
    "\n",
    "# 0 代表 “黑皮诺”，1 代表 “赤霞珠” \n",
    "\n",
    "wine_data = pd.DataFrame(rowdata)\n",
    "\n",
    "wine_data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 计算标记点与所有样本的距离"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "list indices must be integers or slices, not tuple",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-3-c8124d17a601>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;34m[\u001b[0m\u001b[0;36m12.3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m4.1\u001b[0m\u001b[0;34m]\u001b[0m  \u001b[0;34m[\u001b[0m\u001b[0;36m14.23\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m5.64\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m: list indices must be integers or slices, not tuple"
     ]
    }
   ],
   "source": [
    "[12.3,4.1]  [14.23,5.64]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from math import sqrt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.469109151090733"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sqrt((12.3-14.23)**2 + (4.1-5.64) **2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = wine_data.iloc[:,:2].values #将前两列提取出来----data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.63660849e+04, 2.37160000e+00],\n",
       "       [1.39004100e+04, 7.84000000e-02],\n",
       "       [1.38909796e+04, 2.49640000e+00],\n",
       "       [1.64019249e+04, 4.90000000e-01],\n",
       "       [1.39098436e+04, 4.84000000e-02],\n",
       "       [1.16143729e+04, 1.79560000e+00],\n",
       "       [1.16920969e+04, 2.56000000e-02],\n",
       "       [9.70028010e+03, 1.00000000e+00],\n",
       "       [1.16791249e+04, 3.92040000e+00],\n",
       "       [1.16079076e+04, 2.25000000e+00]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(np.array([[12.3,4.1]])-data) ** 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([16366.0849, 13900.41  , 13890.9796, 16401.9249, 13909.8436,\n",
       "       11614.3729, 11692.0969,  9700.2801, 11679.1249, 11607.9076])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = ((np.array([[12.3,4.1]])-data) ** 2)[:,0] #第一列抽取出来\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2.3716, 0.0784, 2.4964, 0.49  , 0.0484, 1.7956, 0.0256, 1.    ,\n",
       "       3.9204, 2.25  ])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b = ((np.array([[12.3,4.1]])-data) ** 2)[:,1] #第二列抽取出来\n",
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([127.9392688 , 117.90033248, 117.87059006, 128.071913  ,\n",
       "       117.94020519, 107.77833038, 108.13011838,  98.49507653,\n",
       "       108.08813672, 107.7504413 ])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Distance = np.sqrt(a+b)\n",
    "Distance"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 对Distance进行排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 98.49507653, 107.7504413 , 107.77833038, 108.08813672,\n",
       "       108.13011838, 117.87059006, 117.90033248, 117.94020519,\n",
       "       127.9392688 , 128.071913  ])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.sort(Distance)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([7, 9, 5])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "K3 = np.argsort(Distance)[:3] #得到开始表的索引值     6 1 4\n",
    "K3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    0\n",
       "1    0\n",
       "2    0\n",
       "3    0\n",
       "4    0\n",
       "5    1\n",
       "6    1\n",
       "7    1\n",
       "8    1\n",
       "9    1\n",
       "Name: 品种, dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = wine_data.品种\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 1, 1]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[y[i] for i in K3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 判断类别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series([y[i] for i in K3]).value_counts().idxmax()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 总结"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# # 1.把10个训练数据提取到data中\n",
    "# data = wine_data.iloc[:,:2].values #将前两列提取出来----data\n",
    "\n",
    "# # 2. 新数据点与10个一维数组的欧式距离\n",
    "# # 数据点第一个特征与10个点的欧式距离\n",
    "# a = ((np.array([[12.3,4.1]])-data) ** 2)[:,0] #第一列抽取出来\n",
    "# # 数据点第二个特征与10个点的欧式距离\n",
    "# b = ((np.array([[12.3,4.1]])-data) ** 2)[:,1] #第二列抽取出来\n",
    "# # 得到数据点与10个点的欧氏距离\n",
    "# Distance = np.sqrt(a+b)\n",
    "# np.sort(Distance)\n",
    "# # 3.排序找出最近的K个点   K=3\n",
    "# K3 = np.argsort(Distance)[:3] #得到开始表的索引值     6 1 4\n",
    "\n",
    "# # 4.判断类别\n",
    "# y = wine_data.品种\n",
    "# # 根据频数统计判断属于哪一类\n",
    "# pd.Series([y[i] for i in K3]).value_counts().idxmax()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "def KNN(x):  #x是输入的点  返回类别\n",
    "    # 1.把10个训练数据提取到data中\n",
    "    data = wine_data.iloc[:,:2].values #将前两列提取出来----data\n",
    "\n",
    "    # 2. 新数据点与10个一维数组的欧式距离\n",
    "    # 数据点第一个特征与10个点的欧式距离\n",
    "    a = ((x-data) ** 2)[:,0] #第一列抽取出来\n",
    "    # 数据点第二个特征与10个点的欧式距离\n",
    "    b = ((x-data) ** 2)[:,1] #第二列抽取出来\n",
    "    # 得到数据点与10个点的欧氏距离\n",
    "    Distance = np.sqrt(a+b)\n",
    "    np.sort(Distance)\n",
    "    # 3.排序找出最近的K个点   K=3\n",
    "    K3 = np.argsort(Distance)[:3] #得到开始表的索引值     6 1 4\n",
    "\n",
    "    # 4.判断类别\n",
    "    y = wine_data.品种\n",
    "    # 根据频数统计判断属于哪一类\n",
    "    return pd.Series([y[i] for i in K3]).value_counts().idxmax()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "KNN([[12.01,4.1]])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.array(wine_data.iloc[:,0:2]) # X是特征(酒精的属性)\n",
    "y = np.array(wine_data.iloc[:,-1])  # y是标签"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlEAAAHRCAYAAABKJOybAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAqaUlEQVR4nO3df3DU9Z3H8dduNssvs4SwJCGkiUDuRpTUYqnFFguGEEUJPw6rdKwnv1oZhwJz3uXIyCGaoRfj4IyS87R1sIUrE862R4VTSFfhULFILm2NEFtCJQukLIYQdmUNyf64Pzi2poQkfJLsbsLz8Zf5fpP1nXd/zHP2+91vLOFwOCwAAABcE2usBwAAAOiPiCgAAAADRBQAAIABIgoAAMAAEQUAAGCAiAIAADBARAEAABiwxeJf2tDQEIt/bdQ4nU41NjbGeox+id2ZY3fm2J05dmeO3ZmL5u4yMj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yvM4FAQM8//7wk6ZlnntF7773H7rpp165dysnJ0UsvvaTnn39eN910E7u7Bj6fr8N9+Xw+DR8+/Irj+Au73a7bbrtNktTc3Kxdu3ZpxowZ7K6bjhw5og8++EBLly6NHIv17rjo3wt2796t+vp6fe9739O2bdsix5ubm9v9h4v2du7cqRMnTqiiokJer1etra1qa2vT97//fUnsrzMfffSR0tLS9Pjjj+vixYtasWKFxo4dGznP7q7u8OHDWrp0qaxWq1JTU3XixAm1trZGzrO7ziUlJcnr9Ua+vryvYcOGyefzacSIEe2O40rnz5/Xs88+qyVLliglJUVJSUnsrgvNzc169dVXZbFYtG7dOnk8Hr3wwgsx3x3vRPXQnj17VFtbqxUrVig9PV1nzpxRU1OTJKmyslJf/epXYzxh/Jo7d642bdqkDRs2aMGCBbr33nvldDrZXzfY7XYNGzZMNptNgwYNUnp6ujweD7vrhuzsbH344YeSpM8++0zHjh3TJ598wu66KS0trcP/n/vyl7+sffv2SZLOnTun48eP68Ybb4zdoHHK6/WqrKxMDz/8sP7mb/5GkthdNyQnJ+vZZ59VWVmZNmzYoLS0NK1cuTLmu+OdqB6orKzU5s2bNXbsWK1bt06StGjRIm3cuDHyqZW8vLwYT9l/WCwWLV26lP11w80336zf//73WrNmjSwWi2bOnKkxY8awu26YP3++Xn75Ze3du1etra36u7/7O6Wnp7O7brJarVf93+mrr76q4uJi2Ww2LVu2jE84/hWv16unnnpKXq9XW7dulXTptpCFCxeyO0NTp06N6e542CYAAIABLucBAAAYIKIAAAAMEFEAAAAGiCgAAAADRBQAAIABIgoAAMAAEQUAAGCAiAIAADDwf0Zc8OZvwUPlAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x576 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(10, 8))\n",
    "\n",
    "new_data = np.array([12.01,4.1])\n",
    "\n",
    "plt.scatter(X[y==1,0],X[y==1,1],color='red',label='赤霞珠')\n",
    "plt.scatter(X[y==0,0],X[y==0,1],color='purple',label='黑皮诺')\n",
    "plt.scatter(new_data[0],new_data[1],color='yellow')\n",
    "\n",
    "plt.legend()\n",
    "plt.show();\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 使用sklearn调用KNN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "\n",
    "\n",
    "clf = KNeighborsClassifier(n_neighbors=3)\n",
    "clf = clf.fit(wine_data.iloc[:,0:2],wine_data.iloc[:,-1])\n",
    "\n",
    "clf.predict([[12.01,4.1]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[13.37842381,  5.87862276],\n",
       "       [11.30204055,  5.67253807],\n",
       "       [11.60579049,  3.86484512],\n",
       "       [ 9.46911943,  6.54847549],\n",
       "       [11.87224362,  5.83842048],\n",
       "       [10.15763691,  4.65440515],\n",
       "       [12.44519772,  6.14830157],\n",
       "       [ 9.8693131 ,  2.926469  ],\n",
       "       [11.01294127,  5.02781868],\n",
       "       [10.34428984,  5.37394803]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#生成10个黄点\n",
    "a = np.random.normal(11,2,(10,1))\n",
    "b = np.random.normal(5,1,(10,1))\n",
    "\n",
    "new_data = np.concatenate([a,b],axis=1)\n",
    "\n",
    "new_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf.predict(new_data)  #拿到模型预测的结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_new = np.array([1, 0, 1, 0, 0, 1, 1, 0, 0, 1])  #实际的红酒类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf.score(new_data,y_new)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.],\n",
       "       [0., 1.]])"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf.predict_proba(new_data) #左边一列是标签为0的概率，右边一列是标签为0的概率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "from sklearn.datasets import load_breast_cancer\n",
    "from sklearn.model_selection import train_test_split"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': array([[1.799e+01, 1.038e+01, 1.228e+02, ..., 2.654e-01, 4.601e-01,\n",
       "         1.189e-01],\n",
       "        [2.057e+01, 1.777e+01, 1.329e+02, ..., 1.860e-01, 2.750e-01,\n",
       "         8.902e-02],\n",
       "        [1.969e+01, 2.125e+01, 1.300e+02, ..., 2.430e-01, 3.613e-01,\n",
       "         8.758e-02],\n",
       "        ...,\n",
       "        [1.660e+01, 2.808e+01, 1.083e+02, ..., 1.418e-01, 2.218e-01,\n",
       "         7.820e-02],\n",
       "        [2.060e+01, 2.933e+01, 1.401e+02, ..., 2.650e-01, 4.087e-01,\n",
       "         1.240e-01],\n",
       "        [7.760e+00, 2.454e+01, 4.792e+01, ..., 0.000e+00, 2.871e-01,\n",
       "         7.039e-02]]),\n",
       " 'target': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,\n",
       "        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0,\n",
       "        1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0,\n",
       "        1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0,\n",
       "        0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1,\n",
       "        1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0,\n",
       "        0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0,\n",
       "        1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1,\n",
       "        1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0,\n",
       "        0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "        0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0,\n",
       "        1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1,\n",
       "        1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1,\n",
       "        1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,\n",
       "        1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "        1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1,\n",
       "        1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1]),\n",
       " 'frame': None,\n",
       " 'target_names': array(['malignant', 'benign'], dtype='<U9'),\n",
       " 'DESCR': '.. _breast_cancer_dataset:\\n\\nBreast cancer wisconsin (diagnostic) dataset\\n--------------------------------------------\\n\\n**Data Set Characteristics:**\\n\\n    :Number of Instances: 569\\n\\n    :Number of Attributes: 30 numeric, predictive attributes and the class\\n\\n    :Attribute Information:\\n        - radius (mean of distances from center to points on the perimeter)\\n        - texture (standard deviation of gray-scale values)\\n        - perimeter\\n        - area\\n        - smoothness (local variation in radius lengths)\\n        - compactness (perimeter^2 / area - 1.0)\\n        - concavity (severity of concave portions of the contour)\\n        - concave points (number of concave portions of the contour)\\n        - symmetry\\n        - fractal dimension (\"coastline approximation\" - 1)\\n\\n        The mean, standard error, and \"worst\" or largest (mean of the three\\n        worst/largest values) of these features were computed for each image,\\n        resulting in 30 features.  For instance, field 0 is Mean Radius, field\\n        10 is Radius SE, field 20 is Worst Radius.\\n\\n        - class:\\n                - WDBC-Malignant\\n                - WDBC-Benign\\n\\n    :Summary Statistics:\\n\\n    ===================================== ====== ======\\n                                           Min    Max\\n    ===================================== ====== ======\\n    radius (mean):                        6.981  28.11\\n    texture (mean):                       9.71   39.28\\n    perimeter (mean):                     43.79  188.5\\n    area (mean):                          143.5  2501.0\\n    smoothness (mean):                    0.053  0.163\\n    compactness (mean):                   0.019  0.345\\n    concavity (mean):                     0.0    0.427\\n    concave points (mean):                0.0    0.201\\n    symmetry (mean):                      0.106  0.304\\n    fractal dimension (mean):             0.05   0.097\\n    radius (standard error):              0.112  2.873\\n    texture (standard error):             0.36   4.885\\n    perimeter (standard error):           0.757  21.98\\n    area (standard error):                6.802  542.2\\n    smoothness (standard error):          0.002  0.031\\n    compactness (standard error):         0.002  0.135\\n    concavity (standard error):           0.0    0.396\\n    concave points (standard error):      0.0    0.053\\n    symmetry (standard error):            0.008  0.079\\n    fractal dimension (standard error):   0.001  0.03\\n    radius (worst):                       7.93   36.04\\n    texture (worst):                      12.02  49.54\\n    perimeter (worst):                    50.41  251.2\\n    area (worst):                         185.2  4254.0\\n    smoothness (worst):                   0.071  0.223\\n    compactness (worst):                  0.027  1.058\\n    concavity (worst):                    0.0    1.252\\n    concave points (worst):               0.0    0.291\\n    symmetry (worst):                     0.156  0.664\\n    fractal dimension (worst):            0.055  0.208\\n    ===================================== ====== ======\\n\\n    :Missing Attribute Values: None\\n\\n    :Class Distribution: 212 - Malignant, 357 - Benign\\n\\n    :Creator:  Dr. William H. Wolberg, W. Nick Street, Olvi L. Mangasarian\\n\\n    :Donor: Nick Street\\n\\n    :Date: November, 1995\\n\\nThis is a copy of UCI ML Breast Cancer Wisconsin (Diagnostic) datasets.\\nhttps://goo.gl/U2Uwz2\\n\\nFeatures are computed from a digitized image of a fine needle\\naspirate (FNA) of a breast mass.  They describe\\ncharacteristics of the cell nuclei present in the image.\\n\\nSeparating plane described above was obtained using\\nMultisurface Method-Tree (MSM-T) [K. P. Bennett, \"Decision Tree\\nConstruction Via Linear Programming.\" Proceedings of the 4th\\nMidwest Artificial Intelligence and Cognitive Science Society,\\npp. 97-101, 1992], a classification method which uses linear\\nprogramming to construct a decision tree.  Relevant features\\nwere selected using an exhaustive search in the space of 1-4\\nfeatures and 1-3 separating planes.\\n\\nThe actual linear program used to obtain the separating plane\\nin the 3-dimensional space is that described in:\\n[K. P. Bennett and O. L. Mangasarian: \"Robust Linear\\nProgramming Discrimination of Two Linearly Inseparable Sets\",\\nOptimization Methods and Software 1, 1992, 23-34].\\n\\nThis database is also available through the UW CS ftp server:\\n\\nftp ftp.cs.wisc.edu\\ncd math-prog/cpo-dataset/machine-learn/WDBC/\\n\\n.. topic:: References\\n\\n   - W.N. Street, W.H. Wolberg and O.L. Mangasarian. Nuclear feature extraction \\n     for breast tumor diagnosis. IS&T/SPIE 1993 International Symposium on \\n     Electronic Imaging: Science and Technology, volume 1905, pages 861-870,\\n     San Jose, CA, 1993.\\n   - O.L. Mangasarian, W.N. Street and W.H. Wolberg. Breast cancer diagnosis and \\n     prognosis via linear programming. Operations Research, 43(4), pages 570-577, \\n     July-August 1995.\\n   - W.H. Wolberg, W.N. Street, and O.L. Mangasarian. Machine learning techniques\\n     to diagnose breast cancer from fine-needle aspirates. Cancer Letters 77 (1994) \\n     163-171.',\n",
       " 'feature_names': array(['mean radius', 'mean texture', 'mean perimeter', 'mean area',\n",
       "        'mean smoothness', 'mean compactness', 'mean concavity',\n",
       "        'mean concave points', 'mean symmetry', 'mean fractal dimension',\n",
       "        'radius error', 'texture error', 'perimeter error', 'area error',\n",
       "        'smoothness error', 'compactness error', 'concavity error',\n",
       "        'concave points error', 'symmetry error',\n",
       "        'fractal dimension error', 'worst radius', 'worst texture',\n",
       "        'worst perimeter', 'worst area', 'worst smoothness',\n",
       "        'worst compactness', 'worst concavity', 'worst concave points',\n",
       "        'worst symmetry', 'worst fractal dimension'], dtype='<U23'),\n",
       " 'filename': '/Users/jiunyiyang/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/sklearn/datasets/data/breast_cancer.csv'}"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>平均半径</th>\n",
       "      <th>平均纹理</th>\n",
       "      <th>平均周长</th>\n",
       "      <th>平均面积</th>\n",
       "      <th>平均光滑度</th>\n",
       "      <th>平均紧凑度</th>\n",
       "      <th>平均凹度</th>\n",
       "      <th>平均凹点</th>\n",
       "      <th>平均对称</th>\n",
       "      <th>平均分形维数</th>\n",
       "      <th>...</th>\n",
       "      <th>最差纹理</th>\n",
       "      <th>最差的边界</th>\n",
       "      <th>最差的区域</th>\n",
       "      <th>最差的平滑度</th>\n",
       "      <th>最差的紧凑性</th>\n",
       "      <th>最差的凹陷</th>\n",
       "      <th>最差的凹点</th>\n",
       "      <th>最差的对称性</th>\n",
       "      <th>最差的分形维数</th>\n",
       "      <th>患病否</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>17.99</td>\n",
       "      <td>10.38</td>\n",
       "      <td>122.80</td>\n",
       "      <td>1001.0</td>\n",
       "      <td>0.11840</td>\n",
       "      <td>0.27760</td>\n",
       "      <td>0.3001</td>\n",
       "      <td>0.14710</td>\n",
       "      <td>0.2419</td>\n",
       "      <td>0.07871</td>\n",
       "      <td>...</td>\n",
       "      <td>17.33</td>\n",
       "      <td>184.60</td>\n",
       "      <td>2019.0</td>\n",
       "      <td>0.1622</td>\n",
       "      <td>0.6656</td>\n",
       "      <td>0.7119</td>\n",
       "      <td>0.2654</td>\n",
       "      <td>0.4601</td>\n",
       "      <td>0.11890</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20.57</td>\n",
       "      <td>17.77</td>\n",
       "      <td>132.90</td>\n",
       "      <td>1326.0</td>\n",
       "      <td>0.08474</td>\n",
       "      <td>0.07864</td>\n",
       "      <td>0.0869</td>\n",
       "      <td>0.07017</td>\n",
       "      <td>0.1812</td>\n",
       "      <td>0.05667</td>\n",
       "      <td>...</td>\n",
       "      <td>23.41</td>\n",
       "      <td>158.80</td>\n",
       "      <td>1956.0</td>\n",
       "      <td>0.1238</td>\n",
       "      <td>0.1866</td>\n",
       "      <td>0.2416</td>\n",
       "      <td>0.1860</td>\n",
       "      <td>0.2750</td>\n",
       "      <td>0.08902</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>19.69</td>\n",
       "      <td>21.25</td>\n",
       "      <td>130.00</td>\n",
       "      <td>1203.0</td>\n",
       "      <td>0.10960</td>\n",
       "      <td>0.15990</td>\n",
       "      <td>0.1974</td>\n",
       "      <td>0.12790</td>\n",
       "      <td>0.2069</td>\n",
       "      <td>0.05999</td>\n",
       "      <td>...</td>\n",
       "      <td>25.53</td>\n",
       "      <td>152.50</td>\n",
       "      <td>1709.0</td>\n",
       "      <td>0.1444</td>\n",
       "      <td>0.4245</td>\n",
       "      <td>0.4504</td>\n",
       "      <td>0.2430</td>\n",
       "      <td>0.3613</td>\n",
       "      <td>0.08758</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.42</td>\n",
       "      <td>20.38</td>\n",
       "      <td>77.58</td>\n",
       "      <td>386.1</td>\n",
       "      <td>0.14250</td>\n",
       "      <td>0.28390</td>\n",
       "      <td>0.2414</td>\n",
       "      <td>0.10520</td>\n",
       "      <td>0.2597</td>\n",
       "      <td>0.09744</td>\n",
       "      <td>...</td>\n",
       "      <td>26.50</td>\n",
       "      <td>98.87</td>\n",
       "      <td>567.7</td>\n",
       "      <td>0.2098</td>\n",
       "      <td>0.8663</td>\n",
       "      <td>0.6869</td>\n",
       "      <td>0.2575</td>\n",
       "      <td>0.6638</td>\n",
       "      <td>0.17300</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20.29</td>\n",
       "      <td>14.34</td>\n",
       "      <td>135.10</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>0.10030</td>\n",
       "      <td>0.13280</td>\n",
       "      <td>0.1980</td>\n",
       "      <td>0.10430</td>\n",
       "      <td>0.1809</td>\n",
       "      <td>0.05883</td>\n",
       "      <td>...</td>\n",
       "      <td>16.67</td>\n",
       "      <td>152.20</td>\n",
       "      <td>1575.0</td>\n",
       "      <td>0.1374</td>\n",
       "      <td>0.2050</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>0.1625</td>\n",
       "      <td>0.2364</td>\n",
       "      <td>0.07678</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    平均半径   平均纹理    平均周长    平均面积    平均光滑度    平均紧凑度    平均凹度     平均凹点    平均对称  \\\n",
       "0  17.99  10.38  122.80  1001.0  0.11840  0.27760  0.3001  0.14710  0.2419   \n",
       "1  20.57  17.77  132.90  1326.0  0.08474  0.07864  0.0869  0.07017  0.1812   \n",
       "2  19.69  21.25  130.00  1203.0  0.10960  0.15990  0.1974  0.12790  0.2069   \n",
       "3  11.42  20.38   77.58   386.1  0.14250  0.28390  0.2414  0.10520  0.2597   \n",
       "4  20.29  14.34  135.10  1297.0  0.10030  0.13280  0.1980  0.10430  0.1809   \n",
       "\n",
       "    平均分形维数  ...   最差纹理   最差的边界   最差的区域  最差的平滑度  最差的紧凑性   最差的凹陷   最差的凹点  \\\n",
       "0  0.07871  ...  17.33  184.60  2019.0  0.1622  0.6656  0.7119  0.2654   \n",
       "1  0.05667  ...  23.41  158.80  1956.0  0.1238  0.1866  0.2416  0.1860   \n",
       "2  0.05999  ...  25.53  152.50  1709.0  0.1444  0.4245  0.4504  0.2430   \n",
       "3  0.09744  ...  26.50   98.87   567.7  0.2098  0.8663  0.6869  0.2575   \n",
       "4  0.05883  ...  16.67  152.20  1575.0  0.1374  0.2050  0.4000  0.1625   \n",
       "\n",
       "   最差的对称性  最差的分形维数  患病否  \n",
       "0  0.4601  0.11890  0.0  \n",
       "1  0.2750  0.08902  0.0  \n",
       "2  0.3613  0.08758  0.0  \n",
       "3  0.6638  0.17300  0.0  \n",
       "4  0.2364  0.07678  0.0  \n",
       "\n",
       "[5 rows x 31 columns]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "load_breast_cancer()\n",
    "\n",
    "#读取数据集\n",
    "data = load_breast_cancer()\n",
    "\n",
    "#DateFrame格式显示\n",
    "X = data.data\n",
    "y = data.target\n",
    "name = ['平均半径','平均纹理','平均周长','平均面积',\n",
    "        '平均光滑度','平均紧凑度','平均凹度',\n",
    "        '平均凹点','平均对称','平均分形维数',\n",
    "        '半径误差','纹理误差','周长误差','面积误差',\n",
    "        '平滑度误差','紧凑度误差','凹度误差',\n",
    "        '凹点误差','对称误差',\n",
    "        '分形维数误差','最差半径','最差纹理',\n",
    "        '最差的边界','最差的区域','最差的平滑度',\n",
    "        '最差的紧凑性','最差的凹陷','最差的凹点',\n",
    "        '最差的对称性','最差的分形维数','患病否']\n",
    "\n",
    "data=np.concatenate((X,y.reshape(-1,1)),axis=1)\n",
    "table=pd.DataFrame(data=data,columns=name)\n",
    "table.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 划分测试集与训练集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>平均半径</th>\n",
       "      <th>平均纹理</th>\n",
       "      <th>平均周长</th>\n",
       "      <th>平均面积</th>\n",
       "      <th>平均光滑度</th>\n",
       "      <th>平均紧凑度</th>\n",
       "      <th>平均凹度</th>\n",
       "      <th>平均凹点</th>\n",
       "      <th>平均对称</th>\n",
       "      <th>平均分形维数</th>\n",
       "      <th>...</th>\n",
       "      <th>最差半径</th>\n",
       "      <th>最差纹理</th>\n",
       "      <th>最差的边界</th>\n",
       "      <th>最差的区域</th>\n",
       "      <th>最差的平滑度</th>\n",
       "      <th>最差的紧凑性</th>\n",
       "      <th>最差的凹陷</th>\n",
       "      <th>最差的凹点</th>\n",
       "      <th>最差的对称性</th>\n",
       "      <th>最差的分形维数</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>17.99</td>\n",
       "      <td>10.38</td>\n",
       "      <td>122.80</td>\n",
       "      <td>1001.0</td>\n",
       "      <td>0.11840</td>\n",
       "      <td>0.27760</td>\n",
       "      <td>0.3001</td>\n",
       "      <td>0.14710</td>\n",
       "      <td>0.2419</td>\n",
       "      <td>0.07871</td>\n",
       "      <td>...</td>\n",
       "      <td>25.38</td>\n",
       "      <td>17.33</td>\n",
       "      <td>184.60</td>\n",
       "      <td>2019.0</td>\n",
       "      <td>0.1622</td>\n",
       "      <td>0.6656</td>\n",
       "      <td>0.7119</td>\n",
       "      <td>0.2654</td>\n",
       "      <td>0.4601</td>\n",
       "      <td>0.11890</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20.57</td>\n",
       "      <td>17.77</td>\n",
       "      <td>132.90</td>\n",
       "      <td>1326.0</td>\n",
       "      <td>0.08474</td>\n",
       "      <td>0.07864</td>\n",
       "      <td>0.0869</td>\n",
       "      <td>0.07017</td>\n",
       "      <td>0.1812</td>\n",
       "      <td>0.05667</td>\n",
       "      <td>...</td>\n",
       "      <td>24.99</td>\n",
       "      <td>23.41</td>\n",
       "      <td>158.80</td>\n",
       "      <td>1956.0</td>\n",
       "      <td>0.1238</td>\n",
       "      <td>0.1866</td>\n",
       "      <td>0.2416</td>\n",
       "      <td>0.1860</td>\n",
       "      <td>0.2750</td>\n",
       "      <td>0.08902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>19.69</td>\n",
       "      <td>21.25</td>\n",
       "      <td>130.00</td>\n",
       "      <td>1203.0</td>\n",
       "      <td>0.10960</td>\n",
       "      <td>0.15990</td>\n",
       "      <td>0.1974</td>\n",
       "      <td>0.12790</td>\n",
       "      <td>0.2069</td>\n",
       "      <td>0.05999</td>\n",
       "      <td>...</td>\n",
       "      <td>23.57</td>\n",
       "      <td>25.53</td>\n",
       "      <td>152.50</td>\n",
       "      <td>1709.0</td>\n",
       "      <td>0.1444</td>\n",
       "      <td>0.4245</td>\n",
       "      <td>0.4504</td>\n",
       "      <td>0.2430</td>\n",
       "      <td>0.3613</td>\n",
       "      <td>0.08758</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.42</td>\n",
       "      <td>20.38</td>\n",
       "      <td>77.58</td>\n",
       "      <td>386.1</td>\n",
       "      <td>0.14250</td>\n",
       "      <td>0.28390</td>\n",
       "      <td>0.2414</td>\n",
       "      <td>0.10520</td>\n",
       "      <td>0.2597</td>\n",
       "      <td>0.09744</td>\n",
       "      <td>...</td>\n",
       "      <td>14.91</td>\n",
       "      <td>26.50</td>\n",
       "      <td>98.87</td>\n",
       "      <td>567.7</td>\n",
       "      <td>0.2098</td>\n",
       "      <td>0.8663</td>\n",
       "      <td>0.6869</td>\n",
       "      <td>0.2575</td>\n",
       "      <td>0.6638</td>\n",
       "      <td>0.17300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20.29</td>\n",
       "      <td>14.34</td>\n",
       "      <td>135.10</td>\n",
       "      <td>1297.0</td>\n",
       "      <td>0.10030</td>\n",
       "      <td>0.13280</td>\n",
       "      <td>0.1980</td>\n",
       "      <td>0.10430</td>\n",
       "      <td>0.1809</td>\n",
       "      <td>0.05883</td>\n",
       "      <td>...</td>\n",
       "      <td>22.54</td>\n",
       "      <td>16.67</td>\n",
       "      <td>152.20</td>\n",
       "      <td>1575.0</td>\n",
       "      <td>0.1374</td>\n",
       "      <td>0.2050</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>0.1625</td>\n",
       "      <td>0.2364</td>\n",
       "      <td>0.07678</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 30 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    平均半径   平均纹理    平均周长    平均面积    平均光滑度    平均紧凑度    平均凹度     平均凹点    平均对称  \\\n",
       "0  17.99  10.38  122.80  1001.0  0.11840  0.27760  0.3001  0.14710  0.2419   \n",
       "1  20.57  17.77  132.90  1326.0  0.08474  0.07864  0.0869  0.07017  0.1812   \n",
       "2  19.69  21.25  130.00  1203.0  0.10960  0.15990  0.1974  0.12790  0.2069   \n",
       "3  11.42  20.38   77.58   386.1  0.14250  0.28390  0.2414  0.10520  0.2597   \n",
       "4  20.29  14.34  135.10  1297.0  0.10030  0.13280  0.1980  0.10430  0.1809   \n",
       "\n",
       "    平均分形维数  ...   最差半径   最差纹理   最差的边界   最差的区域  最差的平滑度  最差的紧凑性   最差的凹陷   最差的凹点  \\\n",
       "0  0.07871  ...  25.38  17.33  184.60  2019.0  0.1622  0.6656  0.7119  0.2654   \n",
       "1  0.05667  ...  24.99  23.41  158.80  1956.0  0.1238  0.1866  0.2416  0.1860   \n",
       "2  0.05999  ...  23.57  25.53  152.50  1709.0  0.1444  0.4245  0.4504  0.2430   \n",
       "3  0.09744  ...  14.91  26.50   98.87   567.7  0.2098  0.8663  0.6869  0.2575   \n",
       "4  0.05883  ...  22.54  16.67  152.20  1575.0  0.1374  0.2050  0.4000  0.1625   \n",
       "\n",
       "   最差的对称性  最差的分形维数  \n",
       "0  0.4601  0.11890  \n",
       "1  0.2750  0.08902  \n",
       "2  0.3613  0.08758  \n",
       "3  0.6638  0.17300  \n",
       "4  0.2364  0.07678  \n",
       "\n",
       "[5 rows x 30 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "0    0.0\n",
       "1    0.0\n",
       "2    0.0\n",
       "3    0.0\n",
       "4    0.0\n",
       "Name: 患病否, dtype: float64"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = table.iloc[:,:-1] #X 特征\n",
    "y = table.iloc[:,-1] #y 标签  \n",
    "X.head()\n",
    "y.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9298245614035088"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "#划分训练集(Xtrain,Ytrain)和测试集(Xtest,Ytest)\n",
    "#random_state 随机种子 类似于random.seed()\n",
    "Xtrain,Xtest,Ytrain,Ytest = train_test_split(X,y,test_size=0.2,random_state=420)  \n",
    "\n",
    "#建模\n",
    "clf = KNeighborsClassifier(n_neighbors=2)\n",
    "\n",
    "clf = clf.fit(Xtrain,Ytrain)\n",
    "\n",
    "score = clf.score(Xtest,Ytest)\n",
    "\n",
    "score"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 绘制学习曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD3CAYAAADmBxSSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAmdklEQVR4nO3de3yU5Zn/8c8zGSABEpIwgsQTEUFFTIwiQYsaQ1QUlG3Ftq+1FSzwkxVbd2V3Kxa7uxVL0KUeEGrRFdRdqS97UEEFjRGVgyiIgKCGQ8Ix5EDIiZCEmbl/fwwZQEjIHJI5fd9/YSbPNdcE/OaZe67nfixjjEFERKKKLdQNiIhI8CncRUSikMJdRCQKKdxFRKKQwl1EJAop3EVEopA91A202L9/v9/H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U8+uij2O127r//frp16+ZzjdOJ+XBfvnw533zzDQ888MAZPwg5nd27d3s/DDl8+DDbt2/3+Wx17NixzJ07l8cff5w777yTUaNGMWTIEJ9qvPLKKxQUFACepRXwnBX4omvXrvTo0QO73U63bt3o0qULTqfTpxqA98wyPj7e52PBs1y2adMmwLOkUlRU5FetAwcO8Pbbb/PLX/7Sr79bgL59+1JeXk5VVRXg+dD6qquu8qtWIGpra3niiSf4+c9/7tcyRNeuXVm4cCHV1dUArFu3zudfEMnJyTz55JM88cQTPP744/Tt27ddH6ieqLa2lmnTpnmXIVauXOnX64mPj/f+kk1KSvJrKaOhoYFPPvmEW2+91edjwfMuaPfu3Rw5cgTw/Ez9eecO8PLLL3PNNddw+eWX+3X86UT0tEyg3n//fV566SXS09P57W9/C8ADDzxAv3792l0jJyeHBQsWeCdTfvKTn5z0Nr6z3HnnnTz77LMUFhbStWtX7r//fp9rDB48mI0bN/Lwww9jWRY33XSTzwFQX1/P2rVrmTVrls/P3+KHP/whf/rTn/joo49obm7mRz/6Eb179/a5zrJly5g4caJfa6ktbDYbEydOZM6cOd5pmdzcXL/r+aO2tpb/+q//ora2lldffRXwLG387Gc/a3cNy7KYNGkSTz75JMYYHA5HwJ+r+CMpKYmxY8cyY8YM7HY7mZmZZ5yUOZ0JEybwxz/+EafTSc+ePfmnf/onn2u8/fbbjBo1yueToBY9e/Zk3Lhx/O53vwM8v/z86ePgwYNUVlYyadIkv/poja5QlaCrqqoKKFBFOkN1dTVJSUl+v6sLdwp3EZEoFJ2/skREYpzCXUQkCincRUSikMJdRCQKKdxFRKKQwl1EJAr9f0H3K8Q4eg9cAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "score = [] # 得分列表\n",
    "k = range(1,20) # k的范围\n",
    "\n",
    "for i in k:\n",
    "    clf = KNeighborsClassifier(n_neighbors=i) \n",
    "    clf = clf.fit(Xtrain,Ytrain)\n",
    "    score.append(clf.score(Xtest,Ytest))\n",
    "\n",
    "plt.plot(k,score)\n",
    "plt.xticks(range(1,20)) #x轴换成1-20\n",
    "plt.show();\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于我们建模来讲：\n",
    "1.评分（准确率）\n",
    "2.稳定性------取决于在不同的数据集都能得到稳定的高分数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 带交叉验证的学习曲线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 划分特征数据X与标签y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = table.iloc[:,:-1]\n",
    "y = table.iloc[:,-1]\n",
    "#X.head(),y.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 划分数据集和测试集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "Xtrain,Xtest,Ytrain,Ytest = train_test_split(X,y,test_size=0.2,random_state=400)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 建模"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "from sklearn.model_selection import cross_val_score as CVS\n",
    "from sklearn.preprocessing import MinMaxScaler as mms"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD3CAYAAAAQYlNPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABgl0lEQVR4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d+5c7C9Md1hbW9OrVy/mzp0L5BXKkuRx69YtkpOT8fPzK1EeDyJWFgsVKiUlpVS/fAXhUUhLS8PW1rbEd4uVnSgEgiAIVdyTWd4EQRCEhyYKgSAIQhUnCoEgCEIVJwqBIAhCFScKgSAIQhUnCoEgCEIV938yXbmNKdMnHAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#归一化 \n",
    "Xtrain = mms().fit(Xtrain).transform(Xtrain)\n",
    "Xtest = mms().fit(Xtest).transform(Xtest)\n",
    "\n",
    "mean = []\n",
    "var = []\n",
    "\n",
    "for i in range(1,20):\n",
    "    #K值不能设置过大、过小  ----学习曲线\n",
    "    # 当我们的样本分布很不均匀的时候可以通过设置weights='distance'进行调优\n",
    "    KNN = KNeighborsClassifier(n_neighbors=i,weights='distance') #K 设置的范围  1-19\n",
    "    #交叉验证  折数不能过大  过小  \n",
    "    result = CVS(KNN,Xtrain,Ytrain,cv=5) #5、6折\n",
    "    \n",
    "    mean.append(result.mean()) #均值\n",
    "    var.append(result.var()) #方差\n",
    "\n",
    "mean = np.array(mean)    \n",
    "var = np.array(var)      \n",
    "plt.plot(range(1,20),mean,color='k')\n",
    "plt.plot(range(1,20),mean+var*5,color='r',linestyle='--')\n",
    "plt.plot(range(1,20),mean-var*5,color='r',linestyle='--')\n",
    "plt.xticks(range(1,20))\n",
    "plt.show();\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9649122807017544"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "KNN_K10 = KNeighborsClassifier(n_neighbors=14)\n",
    "clf_k10 = KNN_K10.fit(Xtrain,Ytrain) #训练模型\n",
    "\n",
    "clf_k10.score(Xtest,Ytest)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 归一化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Python实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    0.00\n",
       "1    0.25\n",
       "2    0.50\n",
       "3    1.00\n",
       "Name: 0, dtype: float64"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = [[-1,2],[-0.5,6],[0,10],[1,18]]\n",
    "data_01=pd.DataFrame(data).iloc[:,0] #对第一列进行归一化\n",
    "\n",
    "\n",
    "(data_01-np.min(data_01,axis=0))/(np.max(data_01,axis=0)-np.min(data_01,axis=0))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "224.594px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
